package han.service;

import han.dao.RecordMapper;
import han.pojo.Record;
import han.pojo.countRecord;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @authou HanDianWei
 * @create 2020-10-28 15:52
 */
@Service
public class RecordServiceImpl implements RecordService{
    private RecordMapper recordMapper;
    public void setRecordMapper(RecordMapper recordMapper){
        this.recordMapper = recordMapper;
    }
    public int deleteByPrimaryKey(int p_id) {
        return recordMapper.deleteByPrimaryKey(p_id);
    }

    public int insert(Record record) {
        return recordMapper.insert(record);
    }

    public Record selectByPrimaryKey(int p_id) {
        return recordMapper.selectByPrimaryKey(p_id);
    }

    public int updateByPrimaryKey(Record record) {
        return recordMapper.updateByPrimaryKey(record);
    }

    public List<Record> queryRecord() {
        return recordMapper.queryRecord();
    }

    public List<Record> queryRecordByName(String p_case) {
        return recordMapper.queryRecordByName(p_case);
    }

    public List<Record> queryRecordByClass(String p_class) {
        return recordMapper.queryRecordByClass(p_class);
    }

    public List<countRecord> countRecordByTime(String ptime1,String ptime2) {
        return recordMapper.countRecordByTime(ptime1,ptime2);
    }

    public List<countRecord> countRecordByWeek() {
        return recordMapper.countRecordByWeek();
    }

    public List<countRecord> countRecordAll() {
        return recordMapper.countRecordAll();
    }

    public List<countRecord> countRecordByClass() {
        return recordMapper.countRecordByClass();
    }
}
